package com.loie.datacenter.service.impl;

import com.loie.datacenter.mapper.OrderMapper;
import com.loie.datacenter.model.bo.OrderBO;
import com.loie.datacenter.model.bo.OrderItemBO;
import com.loie.datacenter.model.bo.OrderItemSumBO;
import com.loie.datacenter.model.bo.OrderWithItemBO;
import com.loie.datacenter.service.OrderService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author zhl
 * @create 2021/9/28 14:55
 */
@AllArgsConstructor
@Transactional(readOnly = false)
@Service("orderService")
public class OrderServiceImpl implements OrderService {
    final OrderMapper orderMapper;

    @Override
    public List<OrderBO> getOrderList(OrderBO bo, String user) {
        return orderMapper.getOrderList(bo, user);
    }

    @Override
    public List<OrderItemBO> getOrderItemList(OrderItemBO bo) {
        return orderMapper.getOrderItemList(bo);
    }

    @Override
    public
    OrderItemSumBO getOrderItemSum(OrderItemBO bo) {
        return orderMapper.getOrderItemSum(bo);
    }

    @Override
    public
    OrderItemSumBO getOrderCount(OrderBO bo, String user) {
        return orderMapper.getOrderCount(bo, user);
    }

    @Override
    public List<OrderWithItemBO> getOrderWithItemList(OrderBO bo, String user) {
        return orderMapper.getOrderWithItemList(bo, user);
    }
}
